home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 2
/
AACD 2.iso
/
AACD
/
Magazine
/
GraphicsCards
/
StormMesa
/
README.WIN32
< prev
next >
Wrap
Text File
|
1998-12-15
|
22KB
|
525 lines
Mesa/Readme.win32 - 7/23/98 - Theodore A. Jump - tjump@spgs.com
Win32 builds of Mesa 3.0 are now running! - yay!
Note: while this build set supports generation of a 3Dfx specific
DLL using Mesa, David Bucciarelli's original build files
are the "supported" method. -Ted
NEW: Build GLUT standalone for use with system OpenGL and GLU drivers!
Command-line project supports building all test/demo programs
against these drivers also! This allows you full use of GLUT on
Windows using hardware accelerated OpenGL. Wheee!
NEW: Microsoft Windows fxMesa-in-a-window hack! - if you want fxMesaGL
to render using the 3Dfx Voodoo1 or Voodoo2 hardware into a window
on the desktop then all you need to do is set the MESA_WGL_FX
environment variable to anything other than "fullscreen" and it
will render into a window. If you wish to go fullscreen then you
only need to NOT have the environment variable, or have it set
to "fullscreen". You may also switch at runtime between full-mode
and windowed by pressing ALT-ENTER on the keyboard.
NEW: Microsoft Windows fxMesa dual-monitor support. If the Glide
environment variable SST_DUALHEAD is set to '1' then fxMesa will
never disable the Voodoo output on a Voodoo1 or Voodoo2 display
regardless of whether the fxMesa application is "current" or not.
*** Legalese
These build files are provided as-is and are submitted to be included with
the "Mesa 3-D Graphics Library" package as (currently) maintained by Brian
Paul. These project build files are free software; you can redistribute it
and/or modify it under the terms of the GNU Library General Public License
as published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
These project files are distributed in the hope that they will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library
General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; if not, write to the Free Software Foundation,
Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*** Maintenance Responsiblity and Technical Support
While these files are now part of the Mesa core distribution please do NOT
contact Mr. Paul for help with them if you encounter problems as he can't
help you (currently). I will, however, attempt my straightforward best in
assisting anyone with using these files on their system. I can NOT
guarantee instant responses owing to other responsiblities, but I do try
dang hard to answer any mail w/in 24 hours. I may be contacted at the
above email address for the forseeable future.
-Ted
mailto://tjump@spgs.com
http://www.i21.com/~tjump
*** General Information
These build files facilitate convenient building of many variants of Mesa,
both as static link libraries (including mesaglu) and as dynamic link
libraries that in some cases may be used as "drop-in" replacements for
OpenGL32.DLL on both Windows95 and Windows NT.
The construction of the Win32 command-line build files and projects has
been something of a pet project of mine, and is based upon my own
"standard" Win32 build environment as supplied by the "nmake.mif" file.
They have been tested under Windows95 OSR2, Windows NT 4.0SP3, and Windows
NT 5.0 beta 1. The libraries that they generated have been tested (via the
demo programs) in a *limited* fashion on the above three systems, including
the 3Dfx versions.
The reason I went with command-line build environment instead of the more
convenient IDE-based project files is for two reasons: 1. These appear to
have some amount of portability between versions (the nmake syntax hasn't
changed much since Microsoft C 7.0) while the IDE project files seem to
change drastically each version. and 2. These are readable with any ascii
editor and such are better self-documentation of the file relationships for
more people such that it will facilitate supporting other Win32 compilers.
While these files only deal with building for x86 targeted code it *should*
be possible to add the necessary logic to them to build for the other MSVC
supported CPU targets, I simply have no hardware to test them on nor the
alternative compilers to build with.
*** Prerequisites for use
1. You must have a 32-bit Microsoft compiler installed. I have tested
this with Visual C 5.0 (SP3) and Visual C 4.2, but with minor
(possibly no) modification to the nmake.mak and nmake.mif files this
sequence should work on Visual C 2.0 also. The workspace files
(mesalib.dsw and mesademos-*.dsw) and their included project files
(*.dsp) are specific to the DevStudio IDE - I have made no attempt at
building a VC4 IDE project set as I do not use that any more. Note
that the VC workspace files NO LONGER use NORE are dependant upon the
nmake.mak and nmake.mif files for construction of definition (*.DEF)
and resource (*.RC) files.
*** Visual C 4.x Users Warning ****
Note that early editions of VC4 do NOT have header files current enough
for use building this code base. If you are using VC4 you will either need
to get an update to version 4.2 *or* you may download the Platform SDK
directly from Microsoft's web site (www.microsoft.com) and update your
build environment that way.
*** Visual C 4.x Users Warning ****
2. You must have the PATH, INCLUDE, and LIB environment variables set
properly. With VC5 you can easily get this by executing the VCVARS32.BAT
file that was created for you upon installation. It is found in the
DevStudio\VC\BIN directory, wherever you installed DevStudio. VC4 provides
a similar batch file in it's BIN directory also.
3. (optional) If you're going to build for 3Dfx/Voodoo you will need to
have previously installed the Glide SDK version 2.3 or later, if I
recall. This may be retrieved from www.3dfx.com for no money and some
download time. ;-) These build files assume that you have the Glide SDK
added to the respective environment variables (LIB and INCLUDE).
4. (optional) If you're going to build for S3/Virge you will need the S3
Developers Toolkit which may be downloaded from www.s3.com for the price of
registering on-line and some time. NOTE: I can build the s3mesa.dll file to
completion, however the compilation of s3mesa.c currently generates a large
amount of compiler warnings and between that and the fact that I can not at
all test it I can make no claims to it's ability to execute. Again, like
the 3Dfx version before this, these build files assume you have the S3Dtk H
and LIB files in the path of their respective environment variables.
Note 2: As of Mesa3.0beta6 I have build files, both command-line and IDE,
which should be able to build the s3mesa code base if it weren't for updates
being required in the S3 DD code support (Mesa-3.0/src/s3 directory).
I advise putting any include and lib files for secondary toolkits (Glide,
S3Tk, whatever) in their respective environment variables *before* the
Microsoft-assigned default values.
*** Included programs that exhibit unfortunate or bad behavior
- demos/bounce - doesn't run on high-colors screens? It's requesting an
INDEX display from GLUT and that fails on my true-color desktop. Changing
this to _RGB let's the program work, but it doesn't display
properly. This is probably just an idiosyncracy of my machine though, as
if I test the program using GLUT for System OpenGL on my Intel740 OpenGL
accelerated machine it's just hunky-dory.
- demos/glutfx - runs, but crashes on exit (but not on my Intel740 machine)
- demos/texobj - runs, but crashes on exit if ESC is pressed. Exits cleanly
if the Close box on the window frame is pressed with the mouse. Go figure.
- book/aaindex - doesn't run, can't get pixel format, because it wants an
INDEX display maybe (but is okay on my Intel740 machine)?
- moves of the book/* demos don't respond to ESC being pressed.
- 3dfx/demos/* - all demos run, however they all crash on exit. I've traced
this so far as to determine the call it's happening with. The crash comes
from within Glide during the processing of the grGlideShutdown() call, as
in invalid memory reference exception. I'm wondering if this is because
of some state or processing not being completed before the call. Dunno,
but putting grSstIdle() in just before grGlideShutdown() does NOT fix the
problem.
- 3dfx/demos/tunnel2 - does not run on my system even with SLI mode
disabled. Hmmmm, maybe I need to disconnect my Voodoo2 cards?
*** Important Notes and Changing Default values
- The optimizer settings have been manually reworked in both command line
and DevStudio IDE files to hopefully prevent possible irrational code on
the part of the code generator. Formerly, it was configured for "/Ox",
now it is configured for
- These files build with the code targeted for Pentium processors and
8-byte structure padding.
- The IDE-built programs seem to be "happier" in that the command line
build of the 3Dfx demo "fire" will grenade on exit (?). Otherwise pretty
much everything may be built with either interface.
- The currently configured Mesa version is 3.0beta6, and MesaDemos version
is the same. To change this permanently you will need to edit NMAKE.MAK
and change the lines that look like this (they start o/a line 116):
# Currently, Mesa is at rev 3.0 ...
#
!IF "$(MESAVER)" == ""
MESAVER=3.0
!ENDIF
# used in building all of the resource files for the Mesa DLLs
#
!IF "$(MESAFILEVER)" == ""
MESAFILEVER=3,0,0,0
!ENDIF
# Currently, MesaDemos are at rev 3.0 ..
#
!IF "$(MESADEMOVER)" == ""
MESADEMOVER=3.0
!ENDIF
# used in building all of the resource files for the Aux & Tk DLLs
#
!IF "$(MESADEMOFILEVER)" == ""
MESADEMOFILEVER=3,0,0,0
!ENDIF
- Currently the build files are configured to be used from a Win32
directory that is included inside the main Mesa-3.0 heirarchy.
- The build files are smart enough to find the files for the core lib, glu,
glut, and the various demo programs if they are unpacked in the current
Mesa-3.0 heirarchy, like this:
\Mesa-3.0
\Mesa-3.0\src
\Mesa-3.0\src-glu
\Mesa-3.0\src-glut
\Mesa-3.0\Win32
\Mesa-3.0\samples
\Mesa-3.0\demos
\Mesa-3.0\book
\Mesa-3.0\3Dfx\demos
... should work. This arose because my initial build tests for the
demo files were done before MesaDemos 2.6 had been released.
- To enable use of MMX instructions by the VC5 compiler you may add the
"USE_MMX=1" option to the NMAKE command line, or edit the default in the
NMAKE.MAK file. This does appear to have some affect on the performance
on the library and does not seem to harm it in any way *but* I have done
*no* verification of this. I have an MMX processor so I figured what the
heck. This option is only available with VC5 when building from the
command line.
This is probably required if you are going to modify the code to include
inline MMX instructions though.
- With the exception of the static link libraries generated by this file
set (mesagl.lib, mesaglu.lib, mesaglut.lib) all DLLs and executables are
built against the "Multithreaded DLL" runtime - this means that they
required MSVCRT.DLL or MSVCRTD.DLL in the path to execute.
Note also that the demos are all built aginst the Mesaxxx.lib variants to
ensure that they do *NOT* use system GLU/OpenGL libs. If you want that,
you will need to modify the link parameters. The exception to this rule
(aren't there always) is when you build the 'progs.sgigl' or
'progs.sysgl' targets, these do *NOT* use Mesa at all in the end.
- The 3Dfx build of Mesa has primarily been tested with Quake 2 and it runs
fine on my PC (take that for what you want it)...
- I can not test the S3 build as I have no machines available with Virge
based display cards.
- The multithreaded test code is *not* built as it requires pthreads and I
have as of yet spent not time trying to get that running. The latest word
that I saw WRT threading support on win32 was that they are intending to
support it natively within Win32 - so I'm waiting it out until they get
it done.
- Similarly, the 'xdemos' are not currently built because I haven't gotten
around to building the client libs for native win32 and getting it all
setup for use.
- The OpenGL32.DLL, GLU32.DLL, and GLUT32.DLL files are alias builds, for
conveniences, of the MesaGL32.DLL, MesaGLU32.DLL, and . The demo files
are linked against the prior set to facilitate them working with
different OpenGL driver files (e.g.: you can copy in the fxMesaGL32.DLL
or s3MesaGL32.DLL if you want). Some of the demo programs will NOT work
without Mesa itself as they utilize Mesa-specific functions, most however
will work with any full GL implementation.
*** Output Files
All files are generated and, with the exception of the executable images,
are copied in the the "root intermediate file directory" upon
completion. This upshot of this is that if you build everything in it's
default settings you end up with a copy of all .LIB and .DLL files
generated in ".\win32\release" and these may then be copied to more
permanent places for use in your own programs.
The executable images are copied back to their own source directories so
that they may find any local data files necessary (texture maps, surface
maps, whatever) upon execution. Note that since they are linked against
DLL files you will either need to add the .\win32\release directory to you
path before execution or copy the respective DLL files form .\win32\release
to somewhere in your path.
Because I'm anal about my computer and it's organization, and I like to
prevent collision between builds, each of the subprojects has their own
intermediate file directory inside .\win32\release (for example, when
building mesagl.lib all of it's intermediate files will be found in
.\win32\release\lib.mesagl). This makes it very easy to cleanup as you
only need to remove .\win32\release.
*** Okay, Enough, how do I build with this stuff already Ted!
Okay, no major calamity here. The basic way to use the project file is to
call it via NMAKE from the command line. The format is:
nmake[.exe] /f nmake.mak [options] [target]
The most likely [options] values you will use may be any combination of the
following:
DEBUG=1 or DEBUG=0
USE_MMX=1 or USE_MMX=0
USE_CRTDLL=1 or USE_CRTDLL=0
Note that all three of these options are OFF by default.
The [target] includes but is not limited to the following (for full details
please peruse the NMAKE.MAK and NMAKE.MIF files - but be warned that
NMAKE.MIF is rather large and sometimes hard to follow):
--- convenience targets ---
all - builds everything
libfiles - builds all linking library files
progs - builds all executable images
--- library files, static and dynamic ---
mesagl - static lib build of Mesa core.
mesaglu - static lib build of MesaGLU core.
mesaglut - static lib build of Mesa GLUT core.
mesagl32, mesaglu32,
mesaglut32 - dynamic lib build each lib
opengl32, glu32, glut32
- alias builds of each lib that allow for
convenient replacement of the base opengl32.dll
with the 3Dfx or S3 builds.
--- hardware accelerated mesa builds ---
fxmesagl32 - builds Mesa for use on top of the 3Dfx
Glide runtime libs
s3mesagl32 - builds mesa for use on top of the S3
'S3Tk' runtime libs.
--- executable images ---
progs.book - builds all programs in \book directory
progs.demos - builds all programs in \demos directory
progs.samples - builds all programs in \samples directory
These generate all of the programs in their respective
directories and link the executables against mesa32.dll,
mesaglu32.dll, and mesaglut32.dll and are thus
hard-bound to the CPU-based image generation.
progs.3dfx.demos - builds all programs in \3dfx\demos directory
The following program-generating targets link the executables
against glut32.lib, glu32.lib, opengl32.lib, glide2x,lib,
texus.lib, and winmm.lib and are thus NOT hard-bound to using
Mesa per-se as you can simply replace the opengl32.dll file in
use - but I would definately make sure whichever one I was using
had hardware acceleration.
--- Microsoft/SGI OpenGL-based GLUT and Demo program builds ----
*** IMPORTANT SAFETY TIP: If you're going to build these variants of
GLUT then DO NOT build any other target libraries in this package
first, OR from the command line run the "nmake /f nmake.mak clean"
command first! This is because generation of the GLUT for SGI
OpenGL target libraries conflicts in naming with the static build
libraries of Mesa and it's supporting GLUT build.
Currently, you may build GLUT as either GLUT32.DLL or GLUT.DLL for
use running against either Microsoft or SGI OpenGL for Window,
respectively. This allows for the general use of GLUT 3.7 on Windows
systems with fully compliant OpenGL.
You can build the GLUT DLL files either with the command line by
issuing either of these commands:
nmake /f nmake.mak glut.sysgl
<or>
nmake /f nmake.mak glut.sgigl
OR by using the DevStudio MesaLib Worksapce build the GLUT_SGIGL or
GLUT_SYSGL projects within the DevStudio IDE.
Unfortunately, the only way to build the test programs against this
build of GLUT is via the command line, and I will NOT be making
duplicate demo program projects for the IDE as it's just not worth it,
sorry.
To build the test programs against either MS or SGI OpenGL, you do so
via either of these two commands:
nmake /f nmake.mak progs.sysgl
<or>
nmake /f nmake.mak progs.sgigl
To use the GLUT-for-system-OpenGL in your own programs, you need to do
three things by way of preparation, after building GLUT of course:
1. Copy include\gl\glut.h to somewhere in your %INCLUDE% path, one
likely candidate location would be in your
"DevStudio\VC\INCLUDE\GL" directory.
2. Copy the linking libraries to somewhere in your %LIB% path, one
likely candidate location would be in your "DevStudio\VC\LIB"
directory. The linking libraries you need to copy are as
follows:
.\Release\GLUT32.LIB
.\Release\GLUT.LIB
.\Debug\GLUT32.LIB
.\Debug\GLUT.LIB
3. Copy the runtime libraries to somewhere in your %PATH%, one
likely candidate location would be in WINDOWS\SYSTEM. the files
that you should copy are as follows:
.\Release\GLUT32.DLL
.\Release\GLUT32.PDB
.\Release\GLUT.DLL
.\Release\GLUT.PDB
.\Debug\GLUT32d.DLL
.\Debug\GLUT32d.PDB
.\Debug\GLUTd.DLL
.\Debug\GLUTd.PDB
Some examples are in order ...
... build all static-link libs using MMX support:
nmake /f nmake.mak USE_MMX=1 allstatic
... build all dynamic-link libs using MSVCRT.DLL for C runtime,
also build with MMX support:
nmake /f nmake.mak USE_MMX=1 USE_CRTDLL=1 alldynamic
... build all 3Dfx target DLL files with debugging support:
nmake /f nmake.mak DEBUG=1 allfx
... To build all library variants and all test and demonstration
programs with the default settings you do this:
nmake /f nmake.mak all
... to build all static link libs and nothing else you do this:
nmake /f nmake.mak allstatic
... to build all non-accelerated dynamic link libs you do this:
nmake /f nmake.mak alldynamic
... to build all 3Dfx targeted dynamic link libs you do this:
nmake /f nmake.mak allfx
... to build all S3 Virge targetd dynamic link libs you do this:
nmake /f nmake.mak alls3
... to build all libraries, static and dynamic, in all versions
you do this:
nmake /f nmake.mak libfiles
... to subsequently build all demo and test programs you do this:
nmake /f nmake.mak progs
... to cleanup all intermediate files you do this:
nmake /f clean
You get the picture. (I hope) ;^) You may also specify specify
single targets in a convenient fashion. The rule is simple, any of the
above named lib files, static or dynamic, may be built by providing it's
name on the command line as the target. Examples:
... to build only Mesa as OpenGL32.DLL ...
nmake /f nmake.mak opengl32
... to build only Mesa on top of the 3Dfx Glide API ...
nmake /f nmake.mak fxMesa32
<or>
nmake /f nmake.mak fxMesa
... to build only Mesa on top of the S3 Toolkit ...
nmake /f nmake.mak s3Mesa32
<or>
nmake /f nmake.mak s3mesa
*** Revision history for ./win32 project files
1/18/98 - initial cut submitted and included with core mesa
2/5/98 - fixed internal dependency within nmake.mif upon there being
a $(DEVDIR) variable to make some temporary batch files
dependant upon (thanks to Keven T. McDonnell for finding
that there was this particular bug). I also updated the
build files for 2.6beta6.
2/8/98 - added DevStudio workspace and project files for all lib
files and some test programs. Updated readme.win32.
6/25/98 - initial revision for Mesa 3.0, does not include IDE files,
not everything is running. *sigh*
7/20/98 - Mesa 3.0beta6 rev of all build files, all libs built and
minimally tested, all demo programs built and minimally
tested to within limits of my PC. ;^) Eveything looks
MUCH better now ...